﻿using System;
using System.Windows.Data;
using BizControl.Presentation.ActivityEditModule.Properties;

namespace BizControl.Presentation.ActivityEditModule.Converters
{
  public class BoolToCompletedConverter : IValueConverter
  {
    #region IValueConverter Members

    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
      if (bool.Parse(value.ToString()))
        return Resources.Completed;
      return Resources.NotCompleted;
    }

    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
      return null;
    }

    #endregion
  }
}
